package com.huai.demo_test1.testSolution;

class Solution1 {

    public static String toLowerCase1(String s) {
        if (s==null && "".equals(s)){
            return null;
        }

        StringBuffer sb = new StringBuffer();

        for (char c : s.toCharArray()) {
            if (c>='A' && c<='Z'){
                sb.append((char)(c +32));
            }else {
                sb.append(c);
            }
        }
        return sb.toString();
    }

    public static void main(String[] args) {
        String s = "Hello";
        String lowerCase = toLowerCase1(s);
        System.out.println(lowerCase);
    }
}